---
import { LinkIcon } from './link-icon/LinkIcon';

interface Props {
    level: number;
    id: string;
}

const { level, id } = Astro.props;
const Heading = `h${level}`;
---

<Heading id={id}>
    <slot />
    <LinkIcon href={`#${id}`} />
</Heading>
